describe("MainModule", function()
    local mainModule = {}
    -- By default each test file runs in a separate insulate block

    -- run before the describe block.
    setup(function ()
        package.preload["sample_module"] = function ()
            local mock = {}
            function mock:ModifyInt(value)
                return value * 2
            end
            return mock
        end
        package.preload["sample_module_global"] = function ()
            SampleGlobal = {}
            function SampleGlobal.ModifyInt(value)
                return value * 3
            end
            _G.SampleGlobal = SampleGlobal

        end
        package.preload["sample_module_empty"] = function ()

        end
        mainModule = require("../src/logic/main_module")
    end)

    it("should make value six times of itself", function()
        assert.are.equal(12, mainModule:TimeSixValue(2))
    end)
    it("should return global string", function ()
        stub(_G, "GLOBAL_STRING")
        --print(mainModule:ReturnGlobalString())
        assert.are_not.equal("a global string", mainModule:ReturnGlobalString())
    end)
end)